package org.zcl.内部类;

/**
 * @PROJECT_NAME:
 * @DESCRIPTION: 静态内部类不可以直接访问外围类的非静态数据，而非静态内部类可以直接访问外围类的数据，包括私有数据
 * @USER: ZhuChengLin
 * @DATE: 2021/11/22 18:15
 */
public class A {

    private String name;
    private static String description;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static String getDescription() {
        return description;
    }

    public static void setDescription(String description) {
        A.description = description;
    }

    class B {
        private String str;
        private String desc;

        public B() {
            str = A.this.name;
            desc = A.description;
        }

    }

    static class C {
        private String description;

        public C() {
            description = A.description;
        }
    }
}
